Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(react): make instructions elements ids unique #123

Merged
merged 1 commit into from
Nov 4, 2021

Conversation

lex111
Copy link
Contributor

@lex111 lex111 commented Nov 4, 2021

What kind of change does this pull request introduce?

The instructions elements ids in each code block must be unique, otherwise you will get the following HTML errors if you use more than one code block on web page:

Duplicate ID “enter-instructions”.
The id attribute is used to identify a single element within a document, and is required to be unique. Check the document for repeated IDs.

What is the current behavior?

When I try to check the site with the W3C Validator, I get the "Duplicate ID" errors (see https://validator.w3.org/nu/?doc=https%3A%2F%2Fbeta.reactjs.org%2Flearn for example).

What is the new behavior?

No any "Duplicate ID" errors when validator checks web page that contains multiple code blocks.

What steps did you take to test this? This is required before we can merge, make sure to test the flow you've updated.

  1. Include two code blocks on same web page
  2. Try to validate final HTML markup on https://validator.w3.org/
  3. Make sure that no "Duplicate ID" errors such have been detected

Checklist

  • Documentation
  • Ready to be merged

@vercel
Copy link

vercel bot commented Nov 4, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/codesandbox/sandpack/65Bz5DJDHfiz7BpsPuvKQpyEssMU
✅ Preview: https://sandpack-git-fork-lex111-aria-id-unique-codesandbox1.vercel.app

@vercel vercel bot temporarily deployed to Preview November 4, 2021 10:27 Inactive
Copy link
Member

@danilowoz danilowoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohh nice catch! It looks good to me

@danilowoz danilowoz merged commit 3bd8a78 into codesandbox:main Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants